﻿@inherits UiComponentBase

<input id="confirmDelete" type="checkbox" @bind-value="confirmDelete" class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:ring-offset-black">
<label for="confirmDelete" class="mx-1 select-none dark:text-gray-300">@ConfirmLabel</label>
<button type="button" disabled=@(!confirmDelete) @onclick="OnDelete"
        class=@ClassNames("select-none inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white",
        confirmDelete? "cursor-pointer bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" : "bg-red-400", Class)>
    @if (ChildContent != null)
    {
        @ChildContent
    }
    else
    {
        @Label
    }
</button>
